package com.zorn.platform.history.action;

import com.zorn.core.provider.ActionSupportProvider;
import com.zorn.platform.history.service.IHistoryService;

public class HistoryAction extends ActionSupportProvider {

	/* Fields
	================================================== */
	private IHistoryService historyService;

	/* Methods
	================================================== */
	public String query() {
		historyService.query(getParameterMap());

		setJSONObject(historyService.getResult());

		return JSON_RESULT;
	}

	public String count() {
		historyService.count(getParameterMap());

		setJSONObject(historyService.getResult());

		return JSON_RESULT;
	}

	public String insert() {
		historyService.insert(getParameterMap());

		setJSONObject(historyService.getResult());

		return JSON_RESULT;
	}

	public String update() {
		historyService.update(getParameterMap());

		setJSONObject(historyService.getResult());

		return JSON_RESULT;
	}

	public String delete() {
		historyService.delete(getParameterMap());

		setJSONObject(historyService.getResult());

		return JSON_RESULT;
	}

	/* Getters & Setters
	================================================== */
	public void setHistoryService(IHistoryService historyService) {
		this.historyService = historyService;
	}

}